#ifndef TIMER_H_
#define TIMER_H_

#include "NonCopyable.h"
#include "Singleton.h"

class Counter;
class Timer : public NonCopyable
{
private:
	Timer();
    ~Timer();
	friend class Singleton<Timer>;

public:
	void			Update();
    void            CalculateFrameRate();
	const float		GetDtSeconds() const;
    const float     GetDtMilliSeconds() const;
    const float     GetFrameRate();
    double          GetFrameTimeHR(){return m_frameTime;}
    void            TogglePrint();
	unsigned int	GetElapsedTime();

private:
    bool            m_printing;
	unsigned int	m_oldTicks;
    float           m_frameRate;
	float			m_dt;
    float           m_frames;
    float           m_timeKeep;
    double          m_frameTime;
    Counter*        m_c;
};

typedef Singleton<Timer> TheTimer;

#endif